package com.cybertron.ironhide.manage.persistence;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.poi.ss.usermodel.Cell;

import com.cybertron.ironhide.manage.common.base.Pager;
import com.cybertron.ironhide.manage.domain.Category;

public interface CategoryMapper {
	int deleteByPrimaryKey(String id);

	int insert(Category record);

	int insertSelective(Category record);

	Category selectByPrimaryKey(String id);

	int updateByPrimaryKeySelective(Category record);

	int updateByPrimaryKey(Category record);

	List<Category> selectRootCategories();

	List<Category> selectChildsByParentId(String id, Pager pager);

	List<Category> selectByParentId(String id);

	List<Category> selectByParentId(String id, Pager pager);

	List<Category> selectSeeds(String parentId);

	Category selectSeedsById(String id);

	List<Category> selectChilds(String parentId);

	void deleteByParentId(String id);

	List<Category> selectByLevel(Integer level);

	List<Category> selectByIndex();

	String selectIdByName(Cell cell);

	String selectIdByTitle(String title);

	List<Map<String, String>> selectSuggest(@Param("title") String title,
			@Param("limit") Integer limit);

	String selectIdByParentId(@Param("parentId") String parentId,
			@Param("title") String title);

}